home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0546.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  2.0 KB  |  62 lines

  1.  
  2. >>>>From what I can tell, a newline is ignored by the SGML parser
  3. >>>if it's right after a start tag or right before an end tag.
  4. >>
  5. >>I haven't been following the discussion closely enough to know
  6. >>if a suggestion for dealing with the problem will be helpful,
  7. >>but...
  8. >>
  9. >>I use the SHORTREF feature to implicitly recognize an EMPTY
  10. >><newline> tag wherever I want newlines after a start tag or
  11. >>right before an end tag to be preserved.  The parser will
  12. >>generate the implicit tags which my processing engine then
  13. >>converts back to actual newlines for output display.
  14. >>
  15. >>Although this seems like a pain I believe the behavior of
  16. >>the parser is logically correct and the only way to be consistent.
  17. >
  18. >Your argument is sound, but we're trying to design a format
  19. >that is defined completely in terms of SGML, but parsed by
  20. >homebrew code.
  21. >
  22. >So the SGML declaration for HTML turns the SHORTTAG feature
  23. >off, saving us some parsing hassles.
  24. >
  25. >If you're using a full-featured SGML parser, you can usually
  26. >tweak the DTD to make the stuff parse how you like through
  27. >shortrefs and the like. But we're using a bare-bones
  28. >SGML parser, so we're just trying to get by without
  29. >conflicting with the standard.
  30. >
  31. >Dan
  32.  
  33. I'm at home with the flu, without my copy of ISO 8879 and I
  34. haven't become one who can quote clause and sub-clause from
  35. memory (yet :-)), but ...
  36.  
  37. SHORTTAG is an optional feature, but SHORTREF is not, since
  38. it is required in the SGML declaration.  I think, according
  39. to the standard, a system which does not support SHORTREF
  40. is not compliant and therefore not even minimum SGML.
  41.  
  42. My solution only requires SHORTREF.  I code:
  43.  
  44. <!ELEMENT    newline    - o        EMPTY>
  45. <!ENTITY    nltag    STARTTAG    "newline">
  46. <!SHORTREF    nlmap    "&#RS;"        nltag>
  47. <!USEMAP    nlmap            (verbatim)>
  48.  
  49. The use of OMITTAG in the newline element is not
  50. necessary.  This code causes the parser to recognize
  51. record starts as newline tas within verbatim tags.
  52. My processor converts the newline tags back to record
  53. starts.
  54.  
  55. Michael Leventhal
  56. Oracle Corporation
  57. mleventh@us.oracle.com
  58.  
  59.  
  60.  
  61.  
  62.